home *** CD-ROM | disk | FTP | other *** search
Modula Definition | 1989-01-09 | 4.2 KB | 175 lines |
- DEFINITION MODULE MathLib1;
- (* File : MathLib1.def *)
- (* Date: Octeber , 1986 *)
- (* By: RTA *)
- (* *)
- (* SCCSID = "%R%.%L% %G%"; *)
- (*
- * Copyright (c) 1985,1986,1987,1988,1989 by
- * ana-systems, Foster City, California.
- * All Rights Reserved.
- *
- * This software is furnished under a license and may be used and copied
- * only in accordance with the terms of such license and with the
- * inclusion of the above copyright notice. This software or any other
- * copies thereof may not be provided or otherwise made available to any
- * other person. No title to and ownership of the software is herby
- * transferred.
- *
- * The information in this software is subject to change without notice
- * and should not be construed as a commitment by ana-systems. No
- * warranty is implied or expressed.
- *)
- (* *)
- (* History of Modifcation *)
- (* Date Who Reasone *)
-
- IMPORT MathLib;
- EXPORT QUALIFIED
- pi, e, zero,
- sqrt, power, exp, ln, lg, ld, log,
- sin, cos, tan, csc, sec, cot,
- arcsin, arccos, arctan, arccsc, arcsec, arccot,
- sinh, cosh, tanh, csch, sech, coth,
- arcsinh, arccosh, arctanh, arccsch, arcsech, arccoth,
- real, int, entier, frac, fix, sgn ;
-
-
- VAR
- pi, e,zero :REAL;
-
-
- PROCEDURE sqrt (x: REAL): REAL;
- (* x >= 0
- *)
-
- PROCEDURE power (x,y: REAL): REAL;
- (* x to the power of y.
- x >= 0
- *)
-
- PROCEDURE exp (x: REAL): REAL;
- (* e to the power of x.
- x <= 88
- *)
-
- PROCEDURE ln (x: REAL): REAL;
- (* natural logarithm of x base e.
- x >= 0
- *)
-
- PROCEDURE lg (x: REAL): REAL;
- (* decimal logarithm of x base 10.
- x >= 0
- *)
-
- PROCEDURE ld (x: REAL): REAL;
- (* dual logarithm of x base 2.
- x >= 0
- *)
-
- PROCEDURE log (x,y: REAL):REAL;
- (* logarithm of x base y.
- x >= 0
- *)
-
- PROCEDURE sin (x: REAL):REAL;
-
- PROCEDURE cos (x: REAL): REAL;
-
- PROCEDURE tan (x: REAL): REAL;
- (*
- x <> (2.0 * k +1.0) (pi /2.0)
- *)
-
- PROCEDURE csc (x: REAL): REAL;
- (*
- x <> k * pi
- *)
-
- PROCEDURE sec (x: REAL): REAL;
- (*
- x <> (2.0 * k +1.0) (pi /2.0)
- *)
-
- PROCEDURE cot (x: REAL): REAL;
- (*
- x <> k * pi
- *)
-
- PROCEDURE arcsin (x: REAL): REAL;
-
- PROCEDURE arccos (x: REAL): REAL;
-
- PROCEDURE arctan (x: REAL): REAL;
-
- PROCEDURE arccsc (x: REAL): REAL;
- (* x <> 0.0 *)
-
- PROCEDURE arcsec (x: REAL): REAL;
- (* x <> 0.0 *)
-
- PROCEDURE arccot (x: REAL): REAL;
-
- PROCEDURE sinh (x: REAL): REAL;
-
- PROCEDURE cosh (x: REAL): REAL;
-
- PROCEDURE tanh (x: REAL): REAL;
-
- PROCEDURE csch (x: REAL): REAL;
-
- PROCEDURE sech (x: REAL): REAL;
-
- PROCEDURE coth (x: REAL): REAL;
-
- PROCEDURE arcsinh (x: REAL): REAL;
-
- PROCEDURE arccosh (x: REAL): REAL;
- (* x >= 1.0 *)
-
- PROCEDURE arctanh (x: REAL): REAL;
- (* ABS(x) < 1.0 *)
-
- PROCEDURE arccsch (x: REAL): REAL;
- (* x <> 0 *)
-
- PROCEDURE arcsech (x: REAL): REAL;
- (* 0.0 < x <= 1.0 *)
-
- PROCEDURE arccoth (x: REAL): REAL;
- (* ABS(x) < 1.0 *)
-
- PROCEDURE real (x: INTEGER): REAL;
- (* convert x: INTEGER to x: REAL *)
-
- PROCEDURE int (x: REAL): REAL;
- (* truncate the fraction part of x.
- -2147483647.0 <= x <= +2147483647.0
- *)
-
- PROCEDURE entier (x: REAL): INTEGER;
- (* return the largest integer that is less
- than or equal to x.
- -2147483647.0 <= x <= +2147483647.0
- *)
-
- PROCEDURE frac (x: REAL): REAL;
- (* truncate the fraction part off.
- -2147483647.0 <= x <= +2147483647.0
- *)
-
- PROCEDURE fix (x: REAL; y: INTEGER): REAL;
- (* keep only y digits past the decimal point.
- -2147483647.0 <= x <= +2147483647.0
- *)
-
- PROCEDURE sgn (x: REAL): REAL;
- (* return
- -1.0: x < 0.0
- 0.0: x = 0.0
- 1.0: x > 0.0
- *)
-
- END MathLib1.
-